﻿
    using Maticsoft.BLL;
    using Maticsoft.DBUtility;
    using Maticsoft.Model;
    using System;
    using System.Collections.Specialized;
    using System.Data;
    using System.Web.UI.HtmlControls;
    using Utils;

    public partial class WebPage_Index_XiangmuDabianEdit : HelpBBasePage
    {
        protected NameValueCollection all = new NameValueCollection();
        protected NameValueCollection ask = new NameValueCollection();
        protected Maticsoft.Model.Ask askm = null;
     
        protected NameValueCollection team = new NameValueCollection();
        protected Maticsoft.Model.Team teamm = null;
        protected NameValueCollection user = new NameValueCollection();
        protected Maticsoft.Model.UserInfo userm = null;

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            int @int = Helper.GetInt(base.Request["id"], 0);
            if (base.Request.HttpMethod == "POST")
            {
                Maticsoft.BLL.Ask ask = new Maticsoft.BLL.Ask();
                this.askm = ask.GetModel(@int);
                if (this.askm != null)
                {
                    this.askm.Comment = base.Request["comment"];
                    ask.Update(this.askm);
                    base.SetSuccess("项目答疑答复成功！");
                }
            }
            DataTable table = DbHelperSQL.SelectByFilter("*", "", "id asc", "(select ask.*,[user].username,team.title from ask,[user],team where ask.User_id=[user].id and ask.team_id=team.id and ask.id=" + @int + ") as t1");
            this.all = Helper.GetObjectProteryByDataTable(table, 0);
        }
    }


